/*************************************************************************
	> File Name: 2.solve.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2024-11-25 16:39:18
 ************************************************************************/

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

#define MAX_M 20
#define MAX_N 10000

const int mod = 9973;

int dp[MAX_M + 5][MAX_N + 5];
int val[MAX_M + 5];

int main() {
    int m, n;
    cin >> m >> n;
    for (int i = 1; i <= m; i++) {
        cin >> val[i];
    }
    for (int i = 0; i <= m; i++) {
        dp[i][0] = 1;
    }
    for (int i = 1; i <= m; i++) {
        for (int j = 1; j <= n; j++) {
            dp[i][j] = dp[i - 1][j];
            if (val[i] <= j) {
                dp[i][j] = (dp[i][j] % mod + (dp[i][j - val[i]]) % mod) % mod;
            }
        }
    }
    cout << dp[m][n] << endl;
    return 0;
}
